<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="estateTag" prefix="estateTag" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>

		<title>修改商家案例</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" href="../resource/css/global.css" type="text/css"></link>
	    <link rel="stylesheet" type="text/css" href="../resource/css/easyui/default/easyui.css"></link>
	    <link rel="stylesheet" href="../resource/css/whole.css" type="text/css"></link>
		<link rel="stylesheet" href="../resource/css/memberCenter/infowithoutmenu.css" type="text/css"></link>
		
		<script type="text/javascript" src="../resource/js/My97DatePicker/WdatePicker.js"></script>
	<link rel="stylesheet" href="../resource/js/kindeditor-4.1/plugins/code/prettify.css" />
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/kindeditor-min.js"></script>
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/lang/zh_CN.js"></script>
	<script charset="utf-8" src="../resource/js/kindeditor-4.1/plugins/code/prettify.js"></script>
		<script type="text/javascript" src="../resource/js/jquery-1.4.2.js"></script>
		<script type="text/javascript" src="../resource/js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="modifyCase.js"></script>
	</head>

	<body><estateTag:security></estateTag:security>
		<center><jsp:include page="../index/top.jsp"></jsp:include></center>
      <div style="width: 100%;margin-top: 10px;" align="center">
      <input id="menuCls" type="hidden" value="36">
			<table width="100%" class="layoutTab">
				<tr>
				<!-- 	<td width="20%" align="left" valign="top"><jsp:include page="../menu.jsp"></jsp:include></td> -->
					<td valign="top">
					<form name="form" method="post"
										action="../brand/addcases.shtml"
										onsubmit="return checkmodify()" enctype="multipart/form-data">
					 <div class="position" align="left"><label>您所在的位置：</label>商家管理&nbsp;&nbsp;--&gt;&gt;&nbsp;&nbsp;案例管理--&gt;&gt;&nbsp;&nbsp;修改案例</div>
					<br/><div class="info_top"></div>
					<div class="info_mid">
										<table style="width: 960px;margin-left: 20px;" border="0" cellpadding="1" cellspacing="1" id="userinfo">
											<tr>
												<th  align="center" colspan="2">
													<b>修改案例信息 （<font color="red">*</font> 为必填项，图片最佳尺寸：宽="267" 高="198"）</b>
												</th >
											</tr>

											<tr>
												<td align="right" width="16%">
														<font color="red">*</font>案例标题:
 												</td>
												<td align="left">
														<input id="title" type="text" name="cases.title" size="80" maxlength="50"
															value="${cases.title}" />
												</td>
											</tr>
											<tr>
												<td>
													<div align="right" >
														案例图片:
													</div>
												</td>
												<c:if test="${cases.imgSrc != null}">
												<td align="left">
													<img src="<%=basePath%>${cases.imgSrc}" id="img" width="267" height="198"/>&nbsp;&nbsp;&nbsp;<span id="picbtn"><input type="button"  onclick="modifyPic(picbtn)" value="修改"/></span>
												     <div id="modifyPic"></div>
												</td>
												</c:if>
												<c:if test="${cases.imgSrc == null}">
												<td align="left">
													<input type="file" name="imgcomp" id="img" size="69"/>  
												</td>
												</c:if>
											</tr>
											<tr>
												<td align="right">
														案例描述：
												</td>
												<td align="left" id="filter_ke">
														<textarea style="width:770px;height:400px;word-wrap:break-word;" id="content1" name="cases.content">${cases.content}</textarea>
												</td>
											</tr>

											<tr>
												<td colspan="2" align="center">
													<input type="hidden" name="cases.id" value="${cases.id == null ? 0 :cases.id}">
													<input type="hidden" name="cases.brandId" value="${cases.brandId == null ? 0 :cases.brandId}">
													<input type="hidden" name="cases.createTime" value="${cases.creatTimStr}">
													<input type="submit" value="提交">
													<input type="button" value="返回" onclick="javascript:window.history.go(-1)">
												</td>
											</tr>
										</table>
										   </div>
								<div class="info_bottom">&nbsp;</div>
									</form>
								</td>
							</tr>
						</table>
		</div>
						<div style="margin-top: 10px;">
		</div>    
		<center> <iframe src="../index/footer.html" width="970" height="120" frameborder="0" scrolling="no"></iframe> </center></body>
</html>
 <script>
				var editor;
        KindEditor.ready(function(K) {
		               editor = K.create('#content1', {
		               allowFileManager : true,
		               uploadJson : '<%=basePath %>resource/js/kindeditor-4.1/upload_json.jsp',
				       fileManagerJson : '<%=basePath %>resource/js/kindeditor-4.1/file_manager_json.jsp',
                       items : [
					 	           'preview','source', '|', 'undo', 'redo', '|',  'cut', 'copy', 'paste',
						        'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
						        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
						        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
						        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
						        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
						       'insertfile', 'table', 'hr', 'emoticons', 'map', 'pagebreak',
						        'link', 'unlink'
                  ]
                        
                });
			 });
			
</script>